package org.lvgo.adapter.object.demo1;

/**
 * 我们要让这个船长使用 {@link RowingBoat} 去调用 sail 方法开渔船 <br>
 * 这是适配器模式的使用者，也称客户端.
 *
 * @author http://java-design-patterns.com/
 * @date 2018年08月21日09:16:14
 * @translation lvgo
 */
public class Captain {

    private RowingBoat rowingBoat;

    public Captain() {
    }

    public Captain(RowingBoat rowingBoat) {
        this.rowingBoat = rowingBoat;
    }

    public RowingBoat getRowingBoat() {
        return rowingBoat;
    }

    public void setRowingBoat(RowingBoat rowingBoat) {
        this.rowingBoat = rowingBoat;
    }

    public void row() {
        rowingBoat.row();
    }
}
